Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODStorageUnit


InsertValue

The InsertValue method inserts data into the currently focused value, starting at the offset (inclusive).

void InsertValue (in ODByteArray value);
value
A byte array whose buffer contains the data to be written.
DISCUSSION
You call this method to insert data into the currently focused value without overwriting the existing data at and beyond the current offset. If the focused value is currently a promise value, the promise is fulfilled before the data is written.

This method writes data to the focused value, starting at the current offset. If the focused value contained any data at and beyond the offset, that data appears after the inserted data. The size of the value is automatically increased to accommodate the inserted data.

When you no longer need the structure you pass as the value parameter, you should deallocate that structure and its buffer.

EXCEPTIONS
kODErrUnfocusedStorageUnit
This storage unit is not focused on a value.
kODErrZeroRefCount
This storage unit has a reference count of 0.
SEE ALSO
The ODByteArray type (page 877).
The ODStorageUnit::DeleteValue method (page 680).
The ODStorageUnit::SetValue method (page 714).
"Manipulating the Data in a Value" on page 276 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help